fstats_doe_prediction Module

DOE predictions with confidence and prediction intervals.

This module evaluates a doe_model at a set of factor values and returns the predicted responses along with confidence and prediction intervals. With the design-matrix row (model terms) for a prediction point, the unscaled parameter covariance of the fit, the residual mean squared error, and the critical value of Student's t distribution with degrees of freedom at probability , the intervals are

for the mean response (confidence interval) and for a new observation (prediction interval), respectively. The factor values must be in the same scale (e.g. coded on [-1, 1]) used when the model was fit.

The covariance matrix and the residual statistics are stored in the model by doe_fit_model. For a model that was not created by doe_fit_model, supply the factor values used to fit the model (x_fit) and the residual mean squared error (residual_mse) to the routines.



Functions

public function doe_predict(mdl, x, alpha, x_fit, residual_mse) result(pred)

Computes predictions with confidence and prediction intervals.

Read more…

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl

The DOE model.

real(kind=real64), intent(in), dimension(:,:) :: x

The M-by-N matrix containing the M values of each of the N factors at which to evaluate the model.

real(kind=real64), intent(in), optional :: alpha

The significance level, in the range (0, 1). The default is 0.05 (95% intervals).

real(kind=real64), intent(in), optional, dimension(:,:) :: x_fit

An optional K-by-N matrix containing the factor values used to fit the model. This is used to compute the parameter covariance and the residual degrees of freedom .

real(kind=real64), intent(in), optional :: residual_mse

An optional residual mean squared error of the fit.

Return Value type(doe_prediction)

A doe_prediction object containing the M predicted values, the lower and upper confidence bounds, the lower and upper prediction bounds, and the confidence level.

public function doe_predict_enhanced(mdl, x, alpha, residual_mse, x_fit) result(pred)

Computes predictions with confidence and prediction intervals using a user-supplied residual mean squared error. This is equivalent to doe_predict, and is retained for convenience when the residual mean squared error is computed by the caller.

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl

The DOE model.

real(kind=real64), intent(in), dimension(:,:) :: x

The M-by-N matrix containing the M values of each of the N factors at which to evaluate the model.

real(kind=real64), intent(in), optional :: alpha

The significance level, in the range (0, 1). The default is 0.05 (95% intervals).

real(kind=real64), intent(in), optional :: residual_mse

An optional residual mean squared error of the fit. If omitted, the value stored in the model by doe_fit_model is used.

real(kind=real64), intent(in), optional, dimension(:,:) :: x_fit

An optional K-by-N matrix containing the factor values used to fit the model. This is required if the model was not created by doe_fit_model.

Return Value type(doe_prediction)

A doe_prediction object containing the M predicted values, the lower and upper confidence bounds, the lower and upper prediction bounds, and the confidence level.